package cannes.bean.planning;

/***********************************************************************
 * Module:  Planning.java
 * Author:  p1000666
 * Purpose: Defines the Class Planning
 ***********************************************************************/
import java.util.*;

public class Planning {

    private int id;
    private String typeSelection;
    private Set<Projection> listeProjection = new HashSet<Projection>();

    public Planning() {}

    public Planning(int id, String type) {
        this.id = id;
        this.typeSelection = type;
    }

    public int getId() {
        return id;
    }

    public String getTypeSelection() {
        return typeSelection;
    }

    public Set<Projection> getListeProjection() {
        return listeProjection;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setTypeSelection(String type) {
        this.typeSelection = type;
    }

    public void setListeProjection(Set<Projection> listeProjection) {
        this.listeProjection = listeProjection;
    }

    public void addProjection(Projection p) {
        if (!this.listeProjection.contains(p)) {
            this.listeProjection.add(p);
        }
    }

    public void removeProjection(Projection p) {
        this.listeProjection.remove(p);
    }
}
